<!--
 * @Date: 2022-09-24 16:54:52
 * @LastEditTime: 2022-12-15 15:39:46
 * @Description: content
-->
<template>
  <view class="page-wrap">
    <view class="content" v-html="ruleData.editor"></view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      optionsData: '',
      ruleData: ''
    }
  },

  onLoad(options) {
    this.optionsData = options
  },

  async onReady() {
    if (this.optionsData.id) {
      let data = await this.$common.getRule(this.optionsData.id)

      if (data.editor) {
        data.editor = data.editor.replace(
          /\<img/gi,
          '<img style="width: 100%;vertical-align: middle;"'
        )
      }
      uni.setNavigationBarTitle({ title: data.title })
      this.ruleData = data
    }
  },

  methods: {}
}
</script>

<style lang="scss">
.page-wrap {
  .content {
    width: 100%;
    box-sizing: border-box;
    // padding: 10rpx;
  }
}
</style>
